package com.qqt.csr.workbench.vo.req;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.qqt.csr.common.idempotent.RequestKeyParam;
import com.qqt.csr.common.operalog.OperaLogSchema;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

/**
 * 技能组
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(name = "AddingSkillSetReqVO", description = "新增技能组")
public class AddingSkillSetReqVO implements Serializable {
    @Serial
    private static final long serialVersionUID = -3060545042678767026L;

    /**
     * 名称
     */
    @Schema(description = "名称",requiredMode = Schema.RequiredMode.REQUIRED)
    @OperaLogSchema(desc = "技能组名称")
    @NotBlank(message = "名称不能为空")
    @Size(max = 10, message = "技能组名称最多10字符")
    @RequestKeyParam
    private String name;

    /**
     * 上级
     */
    @Schema(description = "上级id，值为0标识顶级父类",requiredMode = Schema.RequiredMode.REQUIRED)
    @OperaLogSchema(desc = "上级id")
    @NotNull(message = "上级id不能为空")
    @Min(value = 0, message = "上级id必须大于-1")
    @Builder.Default
    @RequestKeyParam
    private Long parentId = 0L;
}